package com.example.demo.zaqizabatest;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ForEachSQl
 * @Author lys4134
 * @Date 2021/10/26 11:55:45
 * @Description ForEachSQl
 * @Version 1.0
 **/
public class ForEachSQl {

    public static void main(String[] args) throws JsonProcessingException {

        serverDown();
//        baremetalDown();
    }

    /**
     * 云主机手动下发
     * @throws JsonProcessingException
     */
    private static void serverDown() throws JsonProcessingException {
        // 云主机手动下发
        String data = "[\n" +
                "{\"创建时间\":\"2022/3/17 12:03\",\"IP地址\":\"10.75.21.192\",\"cmp上面对应主机的uuid\":\"abf7302e-b1b1-43c3-b75d-f2e90b6fa53f\",\"cmp上面对应主机的虚拟网卡的uuid\":\"c7e3450c-145e-4a02-979f-15dd1aed4687\",\"云硬盘名称\":\"caojx2018\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"1000\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0020\",\"cmp上面对应硬盘的uuid\":\"09150dfa-dc21-4168-872b-2f93f25c7c3d\"},\n" +
                "{\"创建时间\":\"2022/3/17 16:58\",\"IP地址\":\"10.75.21.122\",\"cmp上面对应主机的uuid\":\"1d904b9d-c280-4e09-b7af-a005cee136d4\",\"cmp上面对应主机的虚拟网卡的uuid\":\"746eaa45-8eab-40b2-bb39-61f9e42c8ce3\",\"云硬盘名称\":\"caojx2019\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"1000\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0021\",\"cmp上面对应硬盘的uuid\":\"5fb91a7f-c950-42f4-8f9b-2ae73612687c\"},\n" +
                "{\"创建时间\":\"2022/3/17 16:58\",\"IP地址\":\"10.75.21.212\",\"cmp上面对应主机的uuid\":\"ef331a0b-4805-4c7e-9fbc-60daecfa6ebe\",\"cmp上面对应主机的虚拟网卡的uuid\":\"5b013cb9-43b1-4b54-a15c-3f6c50c4c22d\",\"云硬盘名称\":\"caojx2020\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"1000\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0022\",\"cmp上面对应硬盘的uuid\":\"629f7849-dcd0-46e7-a4cc-057ee298fe41\"},\n" +
                "{\"创建时间\":\"2022/3/17 16:58\",\"IP地址\":\"10.75.21.153\",\"cmp上面对应主机的uuid\":\"22b56f2b-d15c-4fd6-995e-adb49d544bd8\",\"cmp上面对应主机的虚拟网卡的uuid\":\"06495cc1-541a-42e2-b6b5-48966bbb967f\",\"云硬盘名称\":\"caojx2021\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"1000\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0023\",\"cmp上面对应硬盘的uuid\":\"d1cdccbf-616d-4510-a131-1f479eee1976\"},\n" +
                "{\"创建时间\":\"2022/3/17 12:38\",\"IP地址\":\"10.75.21.73\",\"cmp上面对应主机的uuid\":\"e7672334-d973-4933-a2a0-f842e55298b7\",\"cmp上面对应主机的虚拟网卡的uuid\":\"c00d4830-bf37-4f2f-b278-57cf19e3e234\",\"云硬盘名称\":\"caojx2034\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0036\",\"cmp上面对应硬盘的uuid\":\"d2ec8712-c347-4190-8466-a38f0b024a2e\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:01\",\"IP地址\":\"10.75.21.150\",\"cmp上面对应主机的uuid\":\"835ae005-0006-4ce7-ada5-8735c8c78b46\",\"cmp上面对应主机的虚拟网卡的uuid\":\"6e3aede6-60ff-4f72-b063-ce0faa8bdaea\",\"云硬盘名称\":\"caojx2035\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0037\",\"cmp上面对应硬盘的uuid\":\"684bbc1e-833a-48ec-99aa-cd66d81d56d5\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:01\",\"IP地址\":\"10.75.21.180\",\"cmp上面对应主机的uuid\":\"6efce741-74e9-472f-a92c-c9cbc7c0693e\",\"cmp上面对应主机的虚拟网卡的uuid\":\"e59dd7a8-ac98-494a-8769-f9d567b9b1a6\",\"云硬盘名称\":\"caojx2036\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0038\",\"cmp上面对应硬盘的uuid\":\"304c90a0-809e-408a-8637-318d759feb3d\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:01\",\"IP地址\":\"10.75.21.130\",\"cmp上面对应主机的uuid\":\"9e224f03-c8ea-417f-992e-14fc77fbe233\",\"cmp上面对应主机的虚拟网卡的uuid\":\"569deaf9-d92d-474a-b9a7-d84391127dcb\",\"云硬盘名称\":\"caojx2037\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0039\",\"cmp上面对应硬盘的uuid\":\"fdea4a36-9d8d-4df4-86ca-155f29a7800a\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:01\",\"IP地址\":\"10.75.21.146\",\"cmp上面对应主机的uuid\":\"4b7fb92d-8514-490a-936a-4d780e87f983\",\"cmp上面对应主机的虚拟网卡的uuid\":\"342e79d7-ef86-411a-92bd-5f792982f743\",\"云硬盘名称\":\"caojx2038\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0040\",\"cmp上面对应硬盘的uuid\":\"ad29dbe5-cc62-45bf-99b7-4f38e4de84bb\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:01\",\"IP地址\":\"10.75.21.148\",\"cmp上面对应主机的uuid\":\"e854f434-cf68-42c8-a677-d5598c7fe0f2\",\"cmp上面对应主机的虚拟网卡的uuid\":\"34245684-2f35-4fc4-885d-5cb2e12924ae\",\"云硬盘名称\":\"caojx2039\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0041\",\"cmp上面对应硬盘的uuid\":\"158f1e62-22d7-429a-be2a-11393f0d157d\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:01\",\"IP地址\":\"10.75.21.138\",\"cmp上面对应主机的uuid\":\"eb072f89-c393-49cb-8ef8-e0e79e55d4b9\",\"cmp上面对应主机的虚拟网卡的uuid\":\"c5b82043-6928-4147-80e8-a4be7ca258de\",\"云硬盘名称\":\"caojx2040\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0042\",\"cmp上面对应硬盘的uuid\":\"fe75ae81-0b95-4f4b-bc80-2b1bb784fe17\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:01\",\"IP地址\":\"10.75.21.206\",\"cmp上面对应主机的uuid\":\"e6a83c51-2856-4f81-9eed-f9f46164bfee\",\"cmp上面对应主机的虚拟网卡的uuid\":\"d17a4c34-42ee-484c-a5c7-5507c4f57f97\",\"云硬盘名称\":\"caojx2041\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0043\",\"cmp上面对应硬盘的uuid\":\"fecf6693-872c-4af2-b679-47831d313551\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:01\",\"IP地址\":\"10.75.21.109\",\"cmp上面对应主机的uuid\":\"74b75720-398a-4dce-ac14-475e47f48c05\",\"cmp上面对应主机的虚拟网卡的uuid\":\"23be822a-9a0b-441e-9df0-fd9b9324b168\",\"云硬盘名称\":\"caojx2042\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0044\",\"cmp上面对应硬盘的uuid\":\"87a48591-f0f9-4264-b5fd-b3d213fb4df6\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:01\",\"IP地址\":\"10.75.21.102\",\"cmp上面对应主机的uuid\":\"6f047d39-7c94-49e1-835c-40cecabdb960\",\"cmp上面对应主机的虚拟网卡的uuid\":\"eb3ccab7-0f74-488b-a31c-0a12a125a0df\",\"云硬盘名称\":\"caojx2043\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0045\",\"cmp上面对应硬盘的uuid\":\"b41cc22f-e4bf-44b1-946a-17e893c22a07\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:01\",\"IP地址\":\"10.75.21.209\",\"cmp上面对应主机的uuid\":\"38aa124a-5492-4a6c-b870-c5d7f76651b6\",\"cmp上面对应主机的虚拟网卡的uuid\":\"041df6a4-ba8a-4c6c-839d-0ccf99adbef7\",\"云硬盘名称\":\"caojx2044\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0046\",\"cmp上面对应硬盘的uuid\":\"7722dab7-bd3b-4418-b940-dc0980d8c9a9\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:04\",\"IP地址\":\"10.75.21.117\",\"cmp上面对应主机的uuid\":\"0451610d-35ef-4e8a-b18f-53ad802739d5\",\"cmp上面对应主机的虚拟网卡的uuid\":\"0dfad31d-6967-43fa-aa4d-ea26b3813c94\",\"云硬盘名称\":\"caojx2045\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0047\",\"cmp上面对应硬盘的uuid\":\"645cb806-5e1f-4c3c-9b60-9b65986cfc42\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:04\",\"IP地址\":\"10.75.21.181\",\"cmp上面对应主机的uuid\":\"37410048-ebbf-4775-981b-1cf8af856165\",\"cmp上面对应主机的虚拟网卡的uuid\":\"8650e0d3-9208-4915-bec4-082be4c172b2\",\"云硬盘名称\":\"caojx2046\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0048\",\"cmp上面对应硬盘的uuid\":\"974fa1b6-9c8b-4681-9855-a9ddfc7945b0\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:04\",\"IP地址\":\"10.75.21.160\",\"cmp上面对应主机的uuid\":\"5373be21-57a2-4d1d-a85a-618544648eb4\",\"cmp上面对应主机的虚拟网卡的uuid\":\"06a810bb-fbe0-4222-8630-62705d007941\",\"云硬盘名称\":\"caojx2047\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0049\",\"cmp上面对应硬盘的uuid\":\"326eb9a7-5286-4cd7-a5ba-e212cd554049\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:04\",\"IP地址\":\"10.75.21.199\",\"cmp上面对应主机的uuid\":\"396d699c-06ad-4ebd-a4a4-52b7a4e22852\",\"cmp上面对应主机的虚拟网卡的uuid\":\"bb735377-decb-449b-a4c1-e039583f5322\",\"云硬盘名称\":\"caojx2048\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0050\",\"cmp上面对应硬盘的uuid\":\"9b20a2a7-1023-44e6-aedf-64998b589223\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:04\",\"IP地址\":\"10.75.21.210\",\"cmp上面对应主机的uuid\":\"deb61c13-4dcb-46aa-adf4-c28b603419b6\",\"cmp上面对应主机的虚拟网卡的uuid\":\"9191ddab-604e-4ece-8eba-730fdc3e836f\",\"云硬盘名称\":\"caojx2049\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0051\",\"cmp上面对应硬盘的uuid\":\"17279aba-5d2e-4499-94fa-5abb9751db0c\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:04\",\"IP地址\":\"10.75.21.31\",\"cmp上面对应主机的uuid\":\"fc4caa84-c0e4-4696-8c28-5af1541f0ca7\",\"cmp上面对应主机的虚拟网卡的uuid\":\"1c4814dd-8455-4864-bbf2-bf60c4899999\",\"云硬盘名称\":\"caojx2050\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0052\",\"cmp上面对应硬盘的uuid\":\"62292c4e-04c1-43cd-afb6-36ef80c09714\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:04\",\"IP地址\":\"10.75.21.132\",\"cmp上面对应主机的uuid\":\"3715cacd-b91f-4c76-96f4-55759a39bf66\",\"cmp上面对应主机的虚拟网卡的uuid\":\"593967fa-f271-45e8-90c3-89c9022a69be\",\"云硬盘名称\":\"caojx2051\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0053\",\"cmp上面对应硬盘的uuid\":\"3ddbaa8e-e14f-4cd8-9e2b-5a7378b81aca\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:04\",\"IP地址\":\"10.75.21.183\",\"cmp上面对应主机的uuid\":\"f43b112e-35e7-457c-8782-524e5f4b9b3e\",\"cmp上面对应主机的虚拟网卡的uuid\":\"c3964678-7ba5-4c8b-9eed-2e1741214ffd\",\"云硬盘名称\":\"caojx2052\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0054\",\"cmp上面对应硬盘的uuid\":\"161d2566-9652-4e9d-976d-d1a2d98bc5ba\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:04\",\"IP地址\":\"10.75.21.127\",\"cmp上面对应主机的uuid\":\"f43b112e-35e7-457c-8782-524e5f4b9b3e\",\"cmp上面对应主机的虚拟网卡的uuid\":\"1e8b39d8-8207-4413-a044-44603bcf8ebf\",\"云硬盘名称\":\"caojx2053\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0055\",\"cmp上面对应硬盘的uuid\":\"55d0d8f8-6505-4578-9aec-13a9625057fe\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:04\",\"IP地址\":\"10.75.21.208\",\"cmp上面对应主机的uuid\":\"f4b3a689-f2d3-410d-96ca-636ef3664bf5\",\"cmp上面对应主机的虚拟网卡的uuid\":\"80d2a2e5-2f26-4b29-9ec7-ba7304e78260\",\"云硬盘名称\":\"caojx2054\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0056\",\"cmp上面对应硬盘的uuid\":\"e5c72da7-86fe-4e59-8293-54cd51439dc2\"},\n" +
                "{\"创建时间\":\"2022/3/17 17:04\",\"IP地址\":\"10.75.21.158\",\"cmp上面对应主机的uuid\":\"10e7143d-98ab-40c6-bb3b-72aa2f862169\",\"cmp上面对应主机的虚拟网卡的uuid\":\"1f010ddc-1743-46bd-86c7-d67beec0bf5e\",\"云硬盘名称\":\"caojx2055\",\"状态\":\"失败\",\"数据中心\":\"北七家412云平台\",\"大小\":\"500\",\"申请人\":\"曹敬轩\",\"硬盘类型\":\"数据盘\",\"所属云主机名称\":\"caojx2-server0057\",\"cmp上面对应硬盘的uuid\":\"145f695f-ac64-4632-88c5-8a32fc209059\"}\n" +
                "]";

        ObjectMapper objectMapper = new ObjectMapper();
        List<Map<String, String>> mapList = objectMapper.readValue(data, new TypeReference<List<Map<String, String>>>() {});

        for (Map<String, String> map : mapList) {
            String server = "UPDATE `biz_cloudos_server` SET `cloud_id` = '" + map.get("cmp上面对应主机的uuid")
                    + "', `create_time` = '" + map.get("创建时间") + "', `fixed_ip` = '"
                    + map.get("IP地址") + "', `status` = 1, `deleted` = 0 WHERE `name` = '"
                    + map.get("所属云主机名称") + "' AND `cmp_cloud_id` = '" + map.get("数据中心") + "';";
            String disk = "UPDATE `biz_cloudos_disk` SET `cloud_id` = '"
                    + map.get("cmp上面对应硬盘的uuid") + "', `status` = 1, `deleted` = 0 WHERE `alias` = '" + map.get("云硬盘名称")
                    + "' AND `cmp_cloud_id` = '" + map.get("数据中心") + "';";
            String port = "UPDATE `biz_cloudos_port` p LEFT JOIN `biz_cloudos_server` s ON s.`uuid` = p.`server_uuid` SET p.`cloud_id` = '"
                    + map.get("cmp上面对应主机的虚拟网卡的uuid") + "', p.`status` = 1, p.`deleted` = 0 WHERE s.`name` = '" + map.get("所属云主机名称")
                    + "' AND s.`cmp_cloud_id` = '" + map.get("数据中心") + "';";

            System.out.println(server);
            System.out.println(disk);
            System.out.println(port);

        }
    }


    /**
     * 裸金属手动下发
     * @throws JsonProcessingException
     */
    private static void baremetalDown() throws JsonProcessingException {
        ObjectMapper objectMapper = new ObjectMapper();

        // 裸金属手动下发
        String baremetalData = "[\n" +
                "{\"名称\":\"liyn24-bare0001\",\"裸金属UUID\":\"a17dea56-e255-412f-bb37-53a215bd92c8\",\"IP地址\":\"10.75.33.32\",\"网卡UUID\":\"b71004ea-0b0b-4048-8a6e-a8d2c056905d\",\"创建时间\":\"2022/3/9 12:22\",\"数据中心\":\"北京\"},\n" +
                "{\"名称\":\"liyn24-bare0002\",\"裸金属UUID\":\"3a7ff2cf-7faa-4089-b760-c40ae266cb1c\",\"IP地址\":\"10.75.33.33\",\"网卡UUID\":\"5d82a2c9-db24-4138-a607-649bb7efad45\",\"创建时间\":\"2022/3/9 12:37\",\"数据中心\":\"北京\"},\n" +
                "{\"名称\":\"liyn24-bare0003\",\"裸金属UUID\":\"d57469b0-50ab-40f4-9b93-3fc5f84b69a9\",\"IP地址\":\"10.75.33.34\",\"网卡UUID\":\"209d3734-2582-4f22-8ee9-9a8134244441\",\"创建时间\":\"2022/3/9 12:36\",\"数据中心\":\"北京\"},\n" +
                "{\"名称\":\"liyn24-bare0004\",\"裸金属UUID\":\"06791889-fea9-4ee2-8a2a-07f53c45cfdb\",\"IP地址\":\"10.75.33.35\",\"网卡UUID\":\"3a8f16e7-099f-4f19-8def-4f4234017a64\",\"创建时间\":\"2022/3/9 12:39\",\"数据中心\":\"北京\"}\n" +
                "]";

        List<Map<String, String>> baremetalDataList = objectMapper.readValue(baremetalData, new TypeReference<List<Map<String, String>>>() {});

        for (Map<String, String> map : baremetalDataList) {
            String server = "UPDATE `biz_cloudos_baremetal` SET `cloud_id` = '" + map.get("裸金属UUID")
                    + "', `create_time` = '" + map.get("创建时间") + "', `fixed_ip` = '"
                    + map.get("IP地址") + "', `status` = 1, `deleted` = 0 WHERE `name` = '"
                    + map.get("名称") + "' AND `cmp_cloud_id` = '" + map.get("数据中心") + "';";
            String port = "UPDATE `biz_cloudos_baremetal_port` p LEFT JOIN `biz_cloudos_baremetal` s ON s.`uuid` = p.`baremetal_uuid` SET p.`cloud_id` = '"
                    + map.get("网卡UUID") + "', p.`status` = 1, p.`deleted` = 0 WHERE s.`name` = '" + map.get("名称")
                    + "' AND s.`cmp_cloud_id` = '" + map.get("数据中心") + "';";

            System.out.println(server);
            System.out.println(port);

        }
    }

}
